package palindrome;

import java.util.*;

public class AddACharToPal {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string;
		int lcs = 0;
		while (scanner.hasNext()) {
			string = scanner.nextLine();
			lcs = longestCS(string, new StringBuilder(string).reverse()
					.toString());
			// 如果一个字符串本身是回文，也可以通过添加一个字符使之变为回文
			System.out.println(lcs >= string.length() - 1 ? "YES" : "NO");
		}
		scanner.close();
	}

	public static int longestCS(String s1, String s2) {
		if (s1 == null || s2 == null) {
			return -1;
		}
		int length1 = s1.length();
		int length2 = s2.length();
		if (length1 <= 0 || length2 <= 0) {
			return 0;
		}
		char[] word1 = s1.toCharArray();
		char[] word2 = s2.toCharArray();
		int[][] result = new int[length1 + 1][length2 + 1];
		for (int i = 1; i <= length1; i++) {
			for (int j = 1; j <= length2; j++) {
				if (word1[i - 1] == word2[j - 1]) {
					result[i][j] = result[i - 1][j - 1] + 1;
				} else {
					result[i][j] = Math.max(result[i - 1][j], result[i][j - 1]);
				}
			}
		}
		return result[length1][length2];
	}
}
